package org.zoomdev.zoom.dao.modules;

import org.zoomdev.zoom.aop.AopFactory;
import org.zoomdev.zoom.common.res.ResScanner;
import org.zoomdev.zoom.dao.transaction.TransMethodInterceptorFactory;
import org.zoomdev.zoom.ioc.annotations.ModuleInit;

public final class CoreDaoModule {
    public static final String NAME = "DAO";

    /**
     * 需要扫描的包名称
     */
    public static String scanPackageName = "dao";
    /**
     * 自动将ddl增量更新同步到数据库(扫描ddl)
     */
    public static boolean autoDdlIncrement = false;

    /**
     * ddl包名称，可以支持多个
     */
    public static String[] ddlPackages;

    public static boolean logSql = false;


    @ModuleInit
    public void config(ResScanner scanner) {
//        List<ResScanner.ClassRes> list = scanner.findClass("*."+scanPackageName+".*");
//        for(ResScanner.ClassRes res : list){
//
//        }
    }

    @ModuleInit
    public void config(AopFactory factory) {
        factory.addFactory(new TransMethodInterceptorFactory(), 10000);
    }

}
